<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" language="javascript" src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-ui-1.8.2.custom.js"></script>
<link href="themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
</head>

<body>

<script language="javascript" type="text/javascript">
$(document).ready(function(){
	$('img').draggable({
		cursor: 'pointer',
		opacity: 0.35,
		revert: true
	});
	
	$('.giohang').droppable({
		drop: function(event, ui) {
			alert($(ui.draggable).siblings('.hdid').val());
		}
	});
	
});
</script>

<div class="giohang" style="width:200px; height:200px; background-color:#FF0000;"></div>

<div class="mydiv">
	<img src="images/h1.jpg" width="120" height="100" />
    <input type="hidden" class="hdid" value="sp01" />
</div>

<div class="mydiv">
	<img src="images/h1.jpg" width="120" height="100" />
    <input type="hidden" class="hdid" value="sp02" />
</div>

<div class="mydiv">
	<img src="images/h1.jpg" width="120" height="100" />
    <input type="hidden" class="hdid" value="sp03" />
</div>


</body>
</html>
